﻿#if _MSC_VER >= 1600    // VC2010
#pragma execution_character_set("utf-8")
#endif
#ifndef FILELINK_H
#define FILELINK_H

#include <QtWidgets>
#include "ui_FileLink.h"
//#include "DirModel.h"
using namespace Ui;

#define CDirModel QFileSystemModel

class CFileLink : public QMainWindow, public FileLinkClass
{
	Q_OBJECT

public:
	CFileLink(QWidget *parent = 0, Qt::WindowFlags flags = 0);
	~CFileLink();

private:
	bool OpenFolder(QComboBox *cboFolder, const QString &strFolder);
	bool copyDirectoryFiles(const QString &fromDir, const QString &toDir, bool coverFileIfExist);

private slots:
	void on_btnCopy_clicked();
	void on_btnLink_clicked();
	void on_btnFolderOpenDst_clicked();
	void on_btnFolderOpenSrc_clicked();
	void on_cboFolderDst_currentIndexChanged(QString);
	void on_cboFolderSrc_currentIndexChanged(QString);

	void slot_srcSelChange ( const QModelIndex & current, const QModelIndex & previous ) ;
	void slot_dstSelChange ( const QModelIndex & current, const QModelIndex & previous ) ;
	void slot_cboFilter_editTextChanged(const QString &);

private:
	CDirModel m_dirModelSrc;
	CDirModel m_dirModelDst;
	bool m_bIsXP;
};

#endif // FILELINK_H
